--
-- PostgreSQL database dump
--

SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;

--
-- Name: postgres; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON DATABASE postgres IS 'default administrative connection database';


--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: 
--

CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;


--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: 
--

COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';


SET search_path = public, pg_catalog;

--
-- Name: armor(bytea); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION armor(bytea) RETURNS text
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pg_armor';


ALTER FUNCTION public.armor(bytea) OWNER TO postgres;

--
-- Name: crypt(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION crypt(text, text) RETURNS text
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pg_crypt';


ALTER FUNCTION public.crypt(text, text) OWNER TO postgres;

--
-- Name: dearmor(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION dearmor(text) RETURNS bytea
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pg_dearmor';


ALTER FUNCTION public.dearmor(text) OWNER TO postgres;

--
-- Name: decrypt(bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION decrypt(bytea, bytea, text) RETURNS bytea
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pg_decrypt';


ALTER FUNCTION public.decrypt(bytea, bytea, text) OWNER TO postgres;

--
-- Name: decrypt_iv(bytea, bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION decrypt_iv(bytea, bytea, bytea, text) RETURNS bytea
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pg_decrypt_iv';


ALTER FUNCTION public.decrypt_iv(bytea, bytea, bytea, text) OWNER TO postgres;

--
-- Name: digest(bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION digest(bytea, text) RETURNS bytea
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pg_digest';


ALTER FUNCTION public.digest(bytea, text) OWNER TO postgres;

--
-- Name: digest(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION digest(text, text) RETURNS bytea
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pg_digest';


ALTER FUNCTION public.digest(text, text) OWNER TO postgres;

--
-- Name: encrypt(bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION encrypt(bytea, bytea, text) RETURNS bytea
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pg_encrypt';


ALTER FUNCTION public.encrypt(bytea, bytea, text) OWNER TO postgres;

--
-- Name: encrypt_iv(bytea, bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION encrypt_iv(bytea, bytea, bytea, text) RETURNS bytea
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pg_encrypt_iv';


ALTER FUNCTION public.encrypt_iv(bytea, bytea, bytea, text) OWNER TO postgres;

--
-- Name: gen_random_bytes(integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gen_random_bytes(integer) RETURNS bytea
    LANGUAGE c STRICT
    AS '$libdir/pgcrypto', 'pg_random_bytes';


ALTER FUNCTION public.gen_random_bytes(integer) OWNER TO postgres;

--
-- Name: gen_salt(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gen_salt(text) RETURNS text
    LANGUAGE c STRICT
    AS '$libdir/pgcrypto', 'pg_gen_salt';


ALTER FUNCTION public.gen_salt(text) OWNER TO postgres;

--
-- Name: gen_salt(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION gen_salt(text, integer) RETURNS text
    LANGUAGE c STRICT
    AS '$libdir/pgcrypto', 'pg_gen_salt_rounds';


ALTER FUNCTION public.gen_salt(text, integer) OWNER TO postgres;

--
-- Name: hmac(bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION hmac(bytea, bytea, text) RETURNS bytea
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pg_hmac';


ALTER FUNCTION public.hmac(bytea, bytea, text) OWNER TO postgres;

--
-- Name: hmac(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION hmac(text, text, text) RETURNS bytea
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pg_hmac';


ALTER FUNCTION public.hmac(text, text, text) OWNER TO postgres;

--
-- Name: is_descendant_of_criterion_item(integer, integer, integer, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION is_descendant_of_criterion_item(integer, integer, integer, integer, integer) RETURNS boolean
    LANGUAGE plpgsql
    AS $_$
    DECLARE
	parent INTEGER;
    BEGIN
	parent := (SELECT fk_parent FROM auction_criterion_list WHERE fk_auction = $1 AND round = $2 AND id_in_auction = $3 AND item_id = $4);
        IF parent = $4 THEN 
		RETURN false;
	END IF;
	IF parent = $5 THEN
		RETURN true;
	ELSE 
		IF parent = 0 THEN
			RETURN false;
		ELSE
			RETURN is_descendant_of_criterion_item($1, $2, $3, parent, $5); 
		END IF;
	END IF;
	RETURN false;
    END;
$_$;


ALTER FUNCTION public.is_descendant_of_criterion_item(integer, integer, integer, integer, integer) OWNER TO postgres;

--
-- Name: is_descendant_of_item(integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION is_descendant_of_item(integer, integer) RETURNS boolean
    LANGUAGE plpgsql
    AS $_$
    DECLARE
	parent INTEGER;
    BEGIN
	parent := (SELECT fk_parent FROM item_tree WHERE  id = $1);
	IF parent = $1 THEN 
		RETURN false;
	END IF;
	IF parent = $2 THEN
		RETURN true;
	ELSE 
		IF parent = 0 THEN
			RETURN false;
		ELSE
			RETURN is_descendant_of_item(parent, $2); 
		END IF;
	END IF;
	RETURN false;
    END;
$_$;


ALTER FUNCTION public.is_descendant_of_item(integer, integer) OWNER TO postgres;

--
-- Name: pgp_key_id(bytea); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_key_id(bytea) RETURNS text
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pgp_key_id_w';


ALTER FUNCTION public.pgp_key_id(bytea) OWNER TO postgres;

--
-- Name: pgp_pub_decrypt(bytea, bytea); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_decrypt(bytea, bytea) RETURNS text
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pgp_pub_decrypt_text';


ALTER FUNCTION public.pgp_pub_decrypt(bytea, bytea) OWNER TO postgres;

--
-- Name: pgp_pub_decrypt(bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_decrypt(bytea, bytea, text) RETURNS text
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pgp_pub_decrypt_text';


ALTER FUNCTION public.pgp_pub_decrypt(bytea, bytea, text) OWNER TO postgres;

--
-- Name: pgp_pub_decrypt(bytea, bytea, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_decrypt(bytea, bytea, text, text) RETURNS text
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pgp_pub_decrypt_text';


ALTER FUNCTION public.pgp_pub_decrypt(bytea, bytea, text, text) OWNER TO postgres;

--
-- Name: pgp_pub_decrypt_bytea(bytea, bytea); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_decrypt_bytea(bytea, bytea) RETURNS bytea
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pgp_pub_decrypt_bytea';


ALTER FUNCTION public.pgp_pub_decrypt_bytea(bytea, bytea) OWNER TO postgres;

--
-- Name: pgp_pub_decrypt_bytea(bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_decrypt_bytea(bytea, bytea, text) RETURNS bytea
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pgp_pub_decrypt_bytea';


ALTER FUNCTION public.pgp_pub_decrypt_bytea(bytea, bytea, text) OWNER TO postgres;

--
-- Name: pgp_pub_decrypt_bytea(bytea, bytea, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_decrypt_bytea(bytea, bytea, text, text) RETURNS bytea
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pgp_pub_decrypt_bytea';


ALTER FUNCTION public.pgp_pub_decrypt_bytea(bytea, bytea, text, text) OWNER TO postgres;

--
-- Name: pgp_pub_encrypt(text, bytea); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_encrypt(text, bytea) RETURNS bytea
    LANGUAGE c STRICT
    AS '$libdir/pgcrypto', 'pgp_pub_encrypt_text';


ALTER FUNCTION public.pgp_pub_encrypt(text, bytea) OWNER TO postgres;

--
-- Name: pgp_pub_encrypt(text, bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_encrypt(text, bytea, text) RETURNS bytea
    LANGUAGE c STRICT
    AS '$libdir/pgcrypto', 'pgp_pub_encrypt_text';


ALTER FUNCTION public.pgp_pub_encrypt(text, bytea, text) OWNER TO postgres;

--
-- Name: pgp_pub_encrypt_bytea(bytea, bytea); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_encrypt_bytea(bytea, bytea) RETURNS bytea
    LANGUAGE c STRICT
    AS '$libdir/pgcrypto', 'pgp_pub_encrypt_bytea';


ALTER FUNCTION public.pgp_pub_encrypt_bytea(bytea, bytea) OWNER TO postgres;

--
-- Name: pgp_pub_encrypt_bytea(bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_pub_encrypt_bytea(bytea, bytea, text) RETURNS bytea
    LANGUAGE c STRICT
    AS '$libdir/pgcrypto', 'pgp_pub_encrypt_bytea';


ALTER FUNCTION public.pgp_pub_encrypt_bytea(bytea, bytea, text) OWNER TO postgres;

--
-- Name: pgp_sym_decrypt(bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_sym_decrypt(bytea, text) RETURNS text
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pgp_sym_decrypt_text';


ALTER FUNCTION public.pgp_sym_decrypt(bytea, text) OWNER TO postgres;

--
-- Name: pgp_sym_decrypt(bytea, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_sym_decrypt(bytea, text, text) RETURNS text
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pgp_sym_decrypt_text';


ALTER FUNCTION public.pgp_sym_decrypt(bytea, text, text) OWNER TO postgres;

--
-- Name: pgp_sym_decrypt_bytea(bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_sym_decrypt_bytea(bytea, text) RETURNS bytea
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pgp_sym_decrypt_bytea';


ALTER FUNCTION public.pgp_sym_decrypt_bytea(bytea, text) OWNER TO postgres;

--
-- Name: pgp_sym_decrypt_bytea(bytea, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_sym_decrypt_bytea(bytea, text, text) RETURNS bytea
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/pgcrypto', 'pgp_sym_decrypt_bytea';


ALTER FUNCTION public.pgp_sym_decrypt_bytea(bytea, text, text) OWNER TO postgres;

--
-- Name: pgp_sym_encrypt(text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_sym_encrypt(text, text) RETURNS bytea
    LANGUAGE c STRICT
    AS '$libdir/pgcrypto', 'pgp_sym_encrypt_text';


ALTER FUNCTION public.pgp_sym_encrypt(text, text) OWNER TO postgres;

--
-- Name: pgp_sym_encrypt(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_sym_encrypt(text, text, text) RETURNS bytea
    LANGUAGE c STRICT
    AS '$libdir/pgcrypto', 'pgp_sym_encrypt_text';


ALTER FUNCTION public.pgp_sym_encrypt(text, text, text) OWNER TO postgres;

--
-- Name: pgp_sym_encrypt_bytea(bytea, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_sym_encrypt_bytea(bytea, text) RETURNS bytea
    LANGUAGE c STRICT
    AS '$libdir/pgcrypto', 'pgp_sym_encrypt_bytea';


ALTER FUNCTION public.pgp_sym_encrypt_bytea(bytea, text) OWNER TO postgres;

--
-- Name: pgp_sym_encrypt_bytea(bytea, text, text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION pgp_sym_encrypt_bytea(bytea, text, text) RETURNS bytea
    LANGUAGE c STRICT
    AS '$libdir/pgcrypto', 'pgp_sym_encrypt_bytea';


ALTER FUNCTION public.pgp_sym_encrypt_bytea(bytea, text, text) OWNER TO postgres;

--
-- Name: round_nonnegative(numeric); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION round_nonnegative(numeric) RETURNS numeric
    LANGUAGE sql
    AS $_$
  SELECT
    sign(abs($1) + $1)
		
$_$;


ALTER FUNCTION public.round_nonnegative(numeric) OWNER TO postgres;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- Name: auction; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE auction (
    id integer NOT NULL,
    fk_project integer NOT NULL,
    fk_item integer,
    fk_auction_type character varying(15) NOT NULL,
    fk_auction_status character varying(15) NOT NULL,
    description character varying(4000),
    active_round smallint DEFAULT 1 NOT NULL,
    name character varying(100) NOT NULL,
    item_count numeric DEFAULT 0 NOT NULL,
    price_per_unit numeric DEFAULT 0 NOT NULL,
    fk_currency character varying(10) NOT NULL
);


ALTER TABLE public.auction OWNER TO postgres;

--
-- Name: auction_criterion; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE auction_criterion (
    fk_auction integer NOT NULL,
    fk_criterion_type character varying(30) NOT NULL,
    round smallint DEFAULT 1 NOT NULL,
    id_in_auction smallint DEFAULT 1 NOT NULL,
    name_in_auction character varying(40) NOT NULL,
    direction smallint,
    minimal_step numeric DEFAULT 0 NOT NULL,
    priority integer DEFAULT 1 NOT NULL,
    best_input_value character varying(4000),
    list_type smallint DEFAULT 0 NOT NULL,
    price_type smallint DEFAULT 0 NOT NULL,
    criterion_order_visible smallint DEFAULT 0 NOT NULL,
    criterion_description character varying(4000),
    expansion_level smallint DEFAULT 0 NOT NULL,
    criterion_item_unification smallint DEFAULT 0 NOT NULL,
    CONSTRAINT auction_criterion_chk1 CHECK (((((((((minimal_step >= (0)::numeric) AND (criterion_item_unification = ANY (ARRAY[0, 1]))) AND (direction = ANY (ARRAY[0, 1]))) AND (priority >= 0)) AND (round > 0)) AND (list_type = ANY (ARRAY[0, 1]))) AND (criterion_order_visible = ANY (ARRAY[0, 1]))) AND (price_type = ANY (ARRAY[0, 1]))))
);


ALTER TABLE public.auction_criterion OWNER TO postgres;

--
-- Name: auction_criterion_list; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE auction_criterion_list (
    fk_auction integer NOT NULL,
    round smallint NOT NULL,
    id_in_auction smallint NOT NULL,
    item_id integer NOT NULL,
    name character varying(150) NOT NULL,
    order_no smallint DEFAULT 0 NOT NULL,
    description character varying(4000),
    amount numeric DEFAULT 0,
    code character varying(20),
    unit_type character varying(100),
    default_unit_price numeric DEFAULT 0 NOT NULL,
    fk_parent integer DEFAULT 0 NOT NULL
);


ALTER TABLE public.auction_criterion_list OWNER TO postgres;

--
-- Name: auction_log; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE auction_log (
    id integer NOT NULL,
    fk_auction integer NOT NULL,
    fk_user character varying(40) NOT NULL,
    fk_action character varying(50) NOT NULL,
    value character varying,
    "time" timestamp without time zone NOT NULL,
    fk_auction_round integer DEFAULT 0 NOT NULL,
    fk_target_user character varying(40)
);


ALTER TABLE public.auction_log OWNER TO postgres;

--
-- Name: auction_log_sequencer; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE auction_log_sequencer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.auction_log_sequencer OWNER TO postgres;

--
-- Name: auction_planner; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE auction_planner (
    id integer NOT NULL,
    fk_auction integer NOT NULL,
    fk_action character varying(50) NOT NULL,
    value character varying(200),
    "time" timestamp without time zone NOT NULL
);


ALTER TABLE public.auction_planner OWNER TO postgres;

--
-- Name: auction_planner_sequencer; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE auction_planner_sequencer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.auction_planner_sequencer OWNER TO postgres;

--
-- Name: auction_round; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE auction_round (
    fk_auction integer NOT NULL,
    round smallint NOT NULL,
    fk_round_type character varying(20) NOT NULL,
    fk_compare_algorithm character varying(20),
    best_offer_visible smallint,
    order_visible smallint,
    round_description character varying(4000),
    begining_time timestamp without time zone,
    end_time timestamp without time zone,
    round_active smallint DEFAULT 0 NOT NULL,
    prolong_time bigint DEFAULT 0 NOT NULL,
    best_criterions_visible smallint DEFAULT 0 NOT NULL,
    visible_to_participants smallint DEFAULT 0 NOT NULL,
    criterion_orders_visible smallint DEFAULT 0 NOT NULL,
    CONSTRAINT auction_round_chk1 CHECK ((((((((best_offer_visible = ANY (ARRAY[0, 1])) AND (best_criterions_visible = ANY (ARRAY[0, 1]))) AND (order_visible = ANY (ARRAY[0, 1]))) AND (visible_to_participants = ANY (ARRAY[0, 1]))) AND (round_active = ANY (ARRAY[0, 1]))) AND (prolong_time >= 0)) AND (criterion_orders_visible = ANY (ARRAY[0, 1])))),
    CONSTRAINT auction_round_chk2 CHECK ((begining_time < end_time))
);


ALTER TABLE public.auction_round OWNER TO postgres;

--
-- Name: auction_sequencer; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE auction_sequencer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.auction_sequencer OWNER TO postgres;

--
-- Name: auction_user; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE auction_user (
    fk_auction integer NOT NULL,
    fk_user character varying(40) NOT NULL,
    fk_auction_role character varying(20) NOT NULL,
    access_key character varying(60),
    user_coeficient numeric DEFAULT 1 NOT NULL,
    active_in_auction smallint DEFAULT 1 NOT NULL,
    alias character varying(25) NOT NULL,
    CONSTRAINT auction_user_chk1 CHECK (((user_coeficient > (0)::numeric) AND (active_in_auction = ANY (ARRAY[0, 1]))))
);


ALTER TABLE public.auction_user OWNER TO postgres;

--
-- Name: auction_user_criterion; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE auction_user_criterion (
    fk_auction integer NOT NULL,
    fk_user character varying(40) NOT NULL,
    id_in_auction smallint DEFAULT 1 NOT NULL,
    round smallint DEFAULT 1 NOT NULL,
    numeric_value numeric DEFAULT (-1) NOT NULL,
    string_value character varying(4000),
    date_value timestamp without time zone,
    last_modified timestamp without time zone
);


ALTER TABLE public.auction_user_criterion OWNER TO postgres;

--
-- Name: auction_user_criterion_list; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE auction_user_criterion_list (
    fk_auction integer NOT NULL,
    fk_user character varying(20) NOT NULL,
    id_in_auction smallint NOT NULL,
    round smallint NOT NULL,
    item_id integer NOT NULL,
    numeric_value numeric DEFAULT (-1) NOT NULL,
    last_modified timestamp without time zone,
    CONSTRAINT auction_user_c_list_check_1 CHECK ((NOT ((numeric_value < (0)::numeric) AND (numeric_value <> ((-1))::numeric))))
);


ALTER TABLE public.auction_user_criterion_list OWNER TO postgres;

--
-- Name: c_action; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE c_action (
    id character varying(50) NOT NULL,
    description character varying(40)
);


ALTER TABLE public.c_action OWNER TO postgres;

--
-- Name: c_auction_role; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE c_auction_role (
    id character varying(20) NOT NULL,
    description character varying(200)
);


ALTER TABLE public.c_auction_role OWNER TO postgres;

--
-- Name: c_auction_status; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE c_auction_status (
    id character varying(20) NOT NULL,
    description character varying(40)
);


ALTER TABLE public.c_auction_status OWNER TO postgres;

--
-- Name: c_auction_type; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE c_auction_type (
    id character varying(20) NOT NULL,
    description character varying(40)
);


ALTER TABLE public.c_auction_type OWNER TO postgres;

--
-- Name: c_compare_algorithm; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE c_compare_algorithm (
    id character varying(20) NOT NULL,
    description character varying(40)
);


ALTER TABLE public.c_compare_algorithm OWNER TO postgres;

--
-- Name: c_criterion_type; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE c_criterion_type (
    id character varying(40) NOT NULL,
    description character varying(40) NOT NULL
);


ALTER TABLE public.c_criterion_type OWNER TO postgres;

--
-- Name: c_currency; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE c_currency (
    id character varying(10) NOT NULL,
    description character varying(200)
);


ALTER TABLE public.c_currency OWNER TO postgres;

--
-- Name: c_item_type; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE c_item_type (
    id character varying(20) NOT NULL,
    description character varying(40)
);


ALTER TABLE public.c_item_type OWNER TO postgres;

--
-- Name: c_message_type; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE c_message_type (
    id character varying(20) NOT NULL,
    description character varying(40)
);


ALTER TABLE public.c_message_type OWNER TO postgres;

--
-- Name: c_role; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE c_role (
    id character varying(20) NOT NULL,
    description character varying(200)
);


ALTER TABLE public.c_role OWNER TO postgres;

--
-- Name: c_round_type; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE c_round_type (
    id character varying(20) NOT NULL,
    description character varying(40)
);


ALTER TABLE public.c_round_type OWNER TO postgres;

--
-- Name: chat; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE chat (
    id integer NOT NULL,
    fk_sender character varying(40) NOT NULL,
    fk_reciever character varying(40) NOT NULL,
    fk_auction integer DEFAULT 0 NOT NULL,
    fk_message_type character varying(20) NOT NULL,
    message character varying(4000) NOT NULL,
    recieved smallint DEFAULT 0 NOT NULL,
    visible smallint DEFAULT 1 NOT NULL,
    time_sent timestamp without time zone NOT NULL,
    time_recieved timestamp without time zone,
    CONSTRAINT chat_chk1 CHECK (((recieved = ANY (ARRAY[0, 1])) AND (visible = ANY (ARRAY[0, 1]))))
);


ALTER TABLE public.chat OWNER TO postgres;

--
-- Name: chat_sequencer; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE chat_sequencer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.chat_sequencer OWNER TO postgres;

--
-- Name: client; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE client (
    id integer NOT NULL,
    company_name character varying(100),
    ico character varying(30),
    dic character varying(30),
    address character varying(100),
    account_no character varying(20),
    contact_person character varying(40),
    telephone character varying(100),
    email character varying(100),
    fax character varying(100),
    icdph character varying(30)
);


ALTER TABLE public.client OWNER TO postgres;

--
-- Name: client_sequencer; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE client_sequencer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.client_sequencer OWNER TO postgres;

--
-- Name: criterion_item_sequencer; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE criterion_item_sequencer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.criterion_item_sequencer OWNER TO postgres;

--
-- Name: item_tree; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE item_tree (
    id integer NOT NULL,
    name character varying(150),
    description character varying(1000),
    fk_item_type character varying(20) NOT NULL,
    auctionable smallint DEFAULT 0 NOT NULL,
    settings character varying(4000),
    unit_type character varying(100),
    code character varying(20),
    default_amount numeric DEFAULT 0 NOT NULL,
    default_unit_price numeric DEFAULT 0 NOT NULL,
    fk_parent integer DEFAULT 0 NOT NULL,
    order_no smallint DEFAULT 0 NOT NULL,
    CONSTRAINT item_tree_chk1 CHECK ((auctionable = ANY (ARRAY[0, 1])))
);


ALTER TABLE public.item_tree OWNER TO postgres;

--
-- Name: item_tree_sequencer; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE item_tree_sequencer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.item_tree_sequencer OWNER TO postgres;

--
-- Name: project; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE project (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    fk_client integer,
    fk_user_owner character varying(40) NOT NULL,
    valid_from timestamp without time zone,
    valid_until timestamp without time zone,
    time_created timestamp without time zone NOT NULL,
    active smallint,
    description character varying(4000),
    CONSTRAINT project_chk1 CHECK ((active = ANY (ARRAY[0, 1])))
);


ALTER TABLE public.project OWNER TO postgres;

--
-- Name: project_item_tree; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE project_item_tree (
    fk_project integer NOT NULL,
    fk_item_tree integer NOT NULL
);


ALTER TABLE public.project_item_tree OWNER TO postgres;

--
-- Name: project_sequencer; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE project_sequencer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.project_sequencer OWNER TO postgres;

--
-- Name: users; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE users (
    login character varying(40) NOT NULL,
    password character varying(60) NOT NULL,
    fk_role character varying(15) NOT NULL,
    fk_client integer,
    name character varying(40),
    surname character varying(40),
    telephone character varying(100),
    email character varying(100),
    active smallint DEFAULT 1,
    valid_until timestamp without time zone,
    last_login timestamp without time zone,
    safe_password smallint DEFAULT 0 NOT NULL,
    skin character varying,
    CONSTRAINT users_chk1 CHECK (((active = ANY (ARRAY[0, 1])) AND (safe_password = ANY (ARRAY[0, 1]))))
);


ALTER TABLE public.users OWNER TO postgres;

--
-- Name: users_item_tree; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE users_item_tree (
    fk_user character varying(40) NOT NULL,
    fk_item_tree integer NOT NULL
);


ALTER TABLE public.users_item_tree OWNER TO postgres;

--
-- Name: v_auction; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW v_auction AS
 SELECT auction.id, 
    auction.fk_project, 
    project.name AS project_name, 
    auction.fk_item, 
    auction.item_count, 
    auction.price_per_unit, 
    item_tree.unit_type, 
    auction.fk_auction_type, 
    auction.fk_auction_status, 
    auction.fk_currency, 
    auction.name AS auction_name, 
    item_tree.code, 
    auction.description, 
    auction.active_round, 
    item_tree.name, 
    item_tree.fk_item_type, 
    project.fk_user_owner, 
    project.active, 
    project.valid_from, 
    project.valid_until
   FROM ((auction
   JOIN item_tree ON ((auction.fk_item = item_tree.id)))
   JOIN project ON ((auction.fk_project = project.id)));


ALTER TABLE public.v_auction OWNER TO postgres;

--
-- Name: v_auction_criterion; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW v_auction_criterion AS
 SELECT auction_criterion.fk_auction, 
    auction_criterion.fk_criterion_type, 
    auction_criterion.round, 
    auction_criterion.id_in_auction, 
    auction_criterion.name_in_auction, 
    auction_criterion.criterion_item_unification, 
    auction_criterion.expansion_level, 
    auction_criterion.direction, 
    auction_criterion.list_type, 
    auction_criterion.price_type, 
    auction_criterion.minimal_step, 
    auction_criterion.priority, 
    auction_criterion.best_input_value, 
    auction_criterion.criterion_order_visible, 
    auction_round.fk_round_type, 
    auction_criterion.criterion_description
   FROM (auction_criterion
   JOIN auction_round USING (fk_auction, round));


ALTER TABLE public.v_auction_criterion OWNER TO postgres;

--
-- Name: v_auction_with_users; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW v_auction_with_users AS
 SELECT auction.id, 
    auction.fk_project, 
    auction.fk_item, 
    auction.item_count, 
    auction.price_per_unit, 
    auction.fk_auction_type, 
    auction.fk_auction_status, 
    auction.description, 
    auction.name AS auction_name, 
    auction.fk_currency, 
    auction.active_round, 
    item_tree.name, 
    item_tree.code, 
    item_tree.fk_item_type, 
    item_tree.unit_type, 
    project.name AS project_name, 
    project.fk_user_owner, 
    project.active, 
    project.valid_from, 
    project.valid_until, 
    auction_user.fk_user, 
    auction_user.fk_auction_role, 
    auction_user.active_in_auction, 
    auction_user.user_coeficient
   FROM (((auction
   JOIN item_tree ON ((auction.fk_item = item_tree.id)))
   JOIN project ON ((auction.fk_project = project.id)))
   LEFT JOIN auction_user ON ((auction_user.fk_auction = auction.id)));


ALTER TABLE public.v_auction_with_users OWNER TO postgres;

--
-- Name: v_criterion_for_user; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW v_criterion_for_user AS
 SELECT auction_user.fk_auction, 
    auction_criterion.fk_criterion_type, 
    auction_criterion.round, 
    auction_criterion.id_in_auction, 
    auction_criterion.criterion_item_unification, 
    auction_criterion.name_in_auction, 
    auction_criterion.direction, 
    auction_criterion.expansion_level, 
    auction_criterion.minimal_step, 
    auction_criterion.priority, 
    auction_criterion.list_type, 
    auction_criterion.price_type, 
    auction_criterion.criterion_order_visible, 
    auction_user_criterion.date_value, 
    auction_user_criterion.numeric_value, 
    auction_user_criterion.string_value, 
    auction_user_criterion.last_modified, 
    auction_round.fk_round_type, 
    users.login, 
    users.name, 
    users.surname, 
    auction_user.active_in_auction, 
    auction_criterion.criterion_description
   FROM (auction_user
   JOIN (((auction_criterion
   JOIN auction_user_criterion USING (fk_auction, round, id_in_auction))
   JOIN auction_round USING (fk_auction, round))
   JOIN users ON (((auction_user_criterion.fk_user)::text = (users.login)::text))) USING (fk_auction, fk_user));


ALTER TABLE public.v_criterion_for_user OWNER TO postgres;

--
-- Name: v_users; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW v_users AS
 SELECT users.login, 
    users.password, 
    users.fk_role, 
    users.fk_client, 
    users.name, 
    users.surname, 
    users.telephone, 
    users.email, 
    users.active, 
    users.valid_until, 
    users.last_login, 
    users.safe_password, 
    users.skin, 
    client.company_name, 
    client.address, 
    client.fax AS client_fax, 
    client.telephone AS client_telephone, 
    client.email AS client_email, 
    client.ico, 
    client.dic, 
    client.icdph, 
    client.contact_person, 
    client.account_no
   FROM (users
   LEFT JOIN client ON ((users.fk_client = client.id)));


ALTER TABLE public.v_users OWNER TO postgres;

--
-- Name: web_message_sequencer; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE web_message_sequencer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.web_message_sequencer OWNER TO postgres;

--
-- Name: web_messages; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE web_messages (
    id integer NOT NULL,
    message character varying(4000) NOT NULL,
    valid_from timestamp without time zone NOT NULL,
    valid_until timestamp without time zone NOT NULL,
    title character varying(200) NOT NULL,
    CONSTRAINT web_message_check_1 CHECK ((valid_from < valid_until))
);


ALTER TABLE public.web_messages OWNER TO postgres;

--
-- Data for Name: auction; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO auction VALUES (2, 2, 0, 'PRIVATE', 'RUNNING', '', 1, 'Rekonštrukcia Poštovej banky', 0, 0, 'EURO');


--
-- Data for Name: auction_criterion; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO auction_criterion VALUES (2, 'NUMERIC', 1, 1, 'Cena', 0, 500.0, 90, '447820.86', 0, 1, 1, 'Kritérium "Cena" sa uvádza v eurách.', 0, 0);
INSERT INTO auction_criterion VALUES (2, 'INTEGER', 1, 2, 'Záruka', 1, 1.0, 10, '60', 0, 0, 1, 'Kritérium "Záruka" sa uvádza v mesiacoch.', 0, 0);


--
-- Data for Name: auction_criterion_list; Type: TABLE DATA; Schema: public; Owner: postgres
--



--
-- Data for Name: auction_log; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO auction_log VALUES (32, 2, 'admin', 'setAuctionRound', '{"beginingTime":null,"bestCriterionsVisible":0,"bestCriterionsVisibleB":false,"bestOfferVisible":0,"bestOfferVisibleB":false,"compareAlgorithm":"","criterionOrdersVisible":0,"criterionOrdersVisibleB":false,"endTime":null,"modifiable":false,"orderVisible":0,"orderVisibleB":false,"prolongTime":120000,"prolongTimeString":"00:02:00","round":1,"roundActive":1,"roundActiveTranslation":"Aktívne","roundDescription":"","roundType":"NORMAL","roundTypeDescription":"","serverTime":null,"visibleToParticipants":0,"visibleToParticipantsB":false}', '2011-11-03 10:53:07.837', 1, NULL);
INSERT INTO auction_log VALUES (33, 2, 'admin', 'removeUserFromAuction', NULL, '2011-11-03 10:55:46.287', 0, 'vksok431');
INSERT INTO auction_log VALUES (34, 2, 'admin', 'setCriterionBestInputValue', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":760665.53,"bestInputValue":"760665.53"}', '2011-11-03 10:57:32.678', 1, 'promto863');
INSERT INTO auction_log VALUES (35, 2, 'admin', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":760665.53,"bestInputValue":"760665.53"}', '2011-11-03 10:57:32.678', 1, 'promto863');
INSERT INTO auction_log VALUES (36, 2, 'admin', 'setCriterionBestInputValue', '{"idInAuction":2,"criterionType":"INTEGER","listType":0,"nameInAuction":"Záruka","numericValue":60,"bestInputValue":"60"}', '2011-11-03 10:57:32.678', 1, 'promto863');
INSERT INTO auction_log VALUES (37, 2, 'admin', 'setCriterionsForUser', '{"idInAuction":2,"criterionType":"INTEGER","listType":0,"nameInAuction":"Záruka","numericValue":60,"bestInputValue":"60"}', '2011-11-03 10:57:32.678', 1, 'promto863');
INSERT INTO auction_log VALUES (38, 2, 'admin', 'setCriterionBestInputValue', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":447820.86,"bestInputValue":"447820.86"}', '2011-11-03 10:58:14.201', 1, 'bau3mex982');
INSERT INTO auction_log VALUES (39, 2, 'admin', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":447820.86,"bestInputValue":"447820.86"}', '2011-11-03 10:58:14.201', 1, 'bau3mex982');
INSERT INTO auction_log VALUES (40, 2, 'admin', 'setCriterionBestInputValue', '{"idInAuction":2,"criterionType":"INTEGER","listType":0,"nameInAuction":"Záruka","numericValue":60,"bestInputValue":"60"}', '2011-11-03 10:58:14.201', 1, 'bau3mex982');
INSERT INTO auction_log VALUES (41, 2, 'admin', 'setCriterionsForUser', '{"idInAuction":2,"criterionType":"INTEGER","listType":0,"nameInAuction":"Záruka","numericValue":60,"bestInputValue":"60"}', '2011-11-03 10:58:14.201', 1, 'bau3mex982');
INSERT INTO auction_log VALUES (42, 2, 'admin', 'setAuctionRound', '{"beginingTime":null,"bestCriterionsVisible":0,"bestCriterionsVisibleB":false,"bestOfferVisible":0,"bestOfferVisibleB":false,"compareAlgorithm":"","criterionOrdersVisible":0,"criterionOrdersVisibleB":false,"endTime":null,"modifiable":false,"orderVisible":0,"orderVisibleB":false,"prolongTime":120000,"prolongTimeString":"00:02:00","round":1,"roundActive":1,"roundActiveTranslation":"Aktívne","roundDescription":"","roundType":"NORMAL","roundTypeDescription":"","serverTime":null,"visibleToParticipants":true,"visibleToParticipantsInt":1}', '2011-11-03 14:05:24.736', 1, NULL);
INSERT INTO auction_log VALUES (43, 2, 'bau3mex982', 'connectCurrentUserToAuction', NULL, '2011-11-03 14:05:44.666', 0, NULL);
INSERT INTO auction_log VALUES (44, 2, 'promto863', 'connectCurrentUserToAuction', NULL, '2011-11-03 14:15:12.889', 0, NULL);
INSERT INTO auction_log VALUES (45, 2, 'admin', 'setAuctionRound', '{"beginingTime":null,"bestCriterionsVisible":0,"bestCriterionsVisibleB":false,"bestOfferVisible":0,"bestOfferVisibleB":false,"compareAlgorithm":"","criterionOrdersVisible":1,"criterionOrdersVisibleB":true,"endTime":null,"modifiable":false,"orderVisible":0,"orderVisibleB":false,"prolongTime":120000,"prolongTimeString":"00:02:00","round":1,"roundActive":1,"roundActiveTranslation":"Aktívne","roundDescription":"","roundType":"NORMAL","roundTypeDescription":"","serverTime":null,"visibleToParticipants":true,"visibleToParticipantsInt":1}', '2011-11-03 14:56:36.472', 1, NULL);
INSERT INTO auction_log VALUES (46, 2, 'admin', 'setAuctionRound', '{"beginingTime":null,"bestCriterionsVisible":0,"bestCriterionsVisibleB":false,"bestOfferVisible":0,"bestOfferVisibleB":false,"compareAlgorithm":"","criterionOrdersVisible":0,"criterionOrdersVisibleB":false,"endTime":null,"modifiable":false,"orderVisible":1,"orderVisibleB":true,"prolongTime":120000,"prolongTimeString":"00:02:00","round":1,"roundActive":1,"roundActiveTranslation":"Aktívne","roundDescription":"","roundType":"NORMAL","roundTypeDescription":"","serverTime":null,"visibleToParticipants":true,"visibleToParticipantsInt":1}', '2011-11-03 14:57:04.886', 1, NULL);
INSERT INTO auction_log VALUES (47, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":730000}', '2011-11-03 15:00:53.75', 1, NULL);
INSERT INTO auction_log VALUES (48, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":720000}', '2011-11-03 15:01:44.147', 1, NULL);
INSERT INTO auction_log VALUES (49, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":710000}', '2011-11-03 15:02:16.783', 1, NULL);
INSERT INTO auction_log VALUES (50, 2, 'admin', 'setAuctionRound', '{"beginingTime":null,"bestCriterionsVisible":1,"bestCriterionsVisibleB":true,"bestOfferVisible":0,"bestOfferVisibleB":false,"compareAlgorithm":"","criterionOrdersVisible":0,"criterionOrdersVisibleB":false,"endTime":null,"modifiable":false,"orderVisible":1,"orderVisibleB":true,"prolongTime":120000,"prolongTimeString":"00:02:00","round":1,"roundActive":1,"roundActiveTranslation":"Aktívne","roundDescription":"","roundType":"NORMAL","roundTypeDescription":"","serverTime":null,"visibleToParticipants":true,"visibleToParticipantsInt":1}', '2011-11-03 15:19:58.554', 1, NULL);
INSERT INTO auction_log VALUES (51, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":650000}', '2011-11-03 15:27:26.318', 1, NULL);
INSERT INTO auction_log VALUES (52, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":600000}', '2011-11-03 15:29:04.547', 1, NULL);
INSERT INTO auction_log VALUES (53, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":550000}', '2011-11-03 15:30:20.868', 1, NULL);
INSERT INTO auction_log VALUES (54, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":500000}', '2011-11-03 15:31:44.191', 1, NULL);
INSERT INTO auction_log VALUES (55, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":480000}', '2011-11-03 15:32:52.947', 1, NULL);
INSERT INTO auction_log VALUES (56, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":460000}', '2011-11-03 15:34:14.276', 1, NULL);
INSERT INTO auction_log VALUES (57, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":450000}', '2011-11-03 15:35:40.298', 1, NULL);
INSERT INTO auction_log VALUES (58, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":447500}', '2011-11-03 15:37:06.404', 1, NULL);
INSERT INTO auction_log VALUES (59, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":447300}', '2011-11-03 15:38:36.249', 1, NULL);
INSERT INTO auction_log VALUES (60, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":447000}', '2011-11-03 15:39:57.728', 1, NULL);
INSERT INTO auction_log VALUES (61, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":446800}', '2011-11-03 15:41:29.603', 1, NULL);
INSERT INTO auction_log VALUES (62, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":446500}', '2011-11-03 15:42:54.041', 1, NULL);
INSERT INTO auction_log VALUES (63, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":446300}', '2011-11-03 15:44:32.046', 1, NULL);
INSERT INTO auction_log VALUES (64, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":446000}', '2011-11-03 15:45:58.718', 1, NULL);
INSERT INTO auction_log VALUES (65, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":445800}', '2011-11-03 15:47:38.169', 1, NULL);
INSERT INTO auction_log VALUES (66, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":445500}', '2011-11-03 15:49:05.346', 1, NULL);
INSERT INTO auction_log VALUES (67, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":445300}', '2011-11-03 15:50:45.9', 1, NULL);
INSERT INTO auction_log VALUES (68, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":445000}', '2011-11-03 15:52:10.885', 1, NULL);
INSERT INTO auction_log VALUES (69, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":444800}', '2011-11-03 15:53:46.228', 1, NULL);
INSERT INTO auction_log VALUES (70, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":444500}', '2011-11-03 15:55:18.278', 1, NULL);
INSERT INTO auction_log VALUES (71, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":444300}', '2011-11-03 15:56:58.898', 1, NULL);
INSERT INTO auction_log VALUES (72, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":444000}', '2011-11-03 15:58:21.981', 1, NULL);
INSERT INTO auction_log VALUES (73, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":443800}', '2011-11-03 16:00:02.626', 1, NULL);
INSERT INTO auction_log VALUES (74, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":443500}', '2011-11-03 16:01:24.421', 1, NULL);
INSERT INTO auction_log VALUES (75, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":443300}', '2011-11-03 16:03:06.642', 1, NULL);
INSERT INTO auction_log VALUES (76, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":443000}', '2011-11-03 16:04:25.781', 1, NULL);
INSERT INTO auction_log VALUES (77, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":442800}', '2011-11-03 16:06:07.002', 1, NULL);
INSERT INTO auction_log VALUES (78, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":442500}', '2011-11-03 16:07:27.537', 1, NULL);
INSERT INTO auction_log VALUES (79, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":442300}', '2011-11-03 16:09:08.608', 1, NULL);
INSERT INTO auction_log VALUES (80, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":442000}', '2011-11-03 16:09:09.246', 1, NULL);
INSERT INTO auction_log VALUES (81, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":441800}', '2011-11-03 16:10:44.557', 1, NULL);
INSERT INTO auction_log VALUES (82, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":441500}', '2011-11-03 16:12:06.544', 1, NULL);
INSERT INTO auction_log VALUES (83, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":441300}', '2011-11-03 16:13:46.788', 1, NULL);
INSERT INTO auction_log VALUES (84, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":441000}', '2011-11-03 16:15:07.193', 1, NULL);
INSERT INTO auction_log VALUES (85, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":440800}', '2011-11-03 16:16:46.008', 1, NULL);
INSERT INTO auction_log VALUES (86, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":440500}', '2011-11-03 16:18:08.246', 1, NULL);
INSERT INTO auction_log VALUES (87, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":440300}', '2011-11-03 16:19:07.788', 1, NULL);
INSERT INTO auction_log VALUES (88, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":439500}', '2011-11-03 16:20:31.845', 1, NULL);
INSERT INTO auction_log VALUES (89, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":439800}', '2011-11-03 16:21:21.406', 1, NULL);
INSERT INTO auction_log VALUES (90, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":439300}', '2011-11-03 16:22:43.561', 1, NULL);
INSERT INTO auction_log VALUES (91, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":438500}', '2011-11-03 16:24:06.159', 1, NULL);
INSERT INTO auction_log VALUES (92, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":438300}', '2011-11-03 16:25:55.954', 1, NULL);
INSERT INTO auction_log VALUES (93, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":438000}', '2011-11-03 16:27:16.085', 1, NULL);
INSERT INTO auction_log VALUES (94, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":437500}', '2011-11-03 16:28:30.075', 1, NULL);
INSERT INTO auction_log VALUES (95, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":437000}', '2011-11-03 16:29:52.095', 1, NULL);
INSERT INTO auction_log VALUES (96, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":436900}', '2011-11-03 16:31:32.099', 1, NULL);
INSERT INTO auction_log VALUES (97, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":436000}', '2011-11-03 16:32:54.31', 1, NULL);
INSERT INTO auction_log VALUES (98, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":435900}', '2011-11-03 16:34:32.696', 1, NULL);
INSERT INTO auction_log VALUES (99, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":435500}', '2011-11-03 16:35:58.485', 1, NULL);
INSERT INTO auction_log VALUES (100, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":435400}', '2011-11-03 16:37:30.157', 1, NULL);
INSERT INTO auction_log VALUES (101, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":435000}', '2011-11-03 16:38:52.09', 1, NULL);
INSERT INTO auction_log VALUES (102, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":434900}', '2011-11-03 16:40:20.495', 1, NULL);
INSERT INTO auction_log VALUES (103, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":434500}', '2011-11-03 16:41:42.141', 1, NULL);
INSERT INTO auction_log VALUES (104, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":434400}', '2011-11-03 16:43:03.299', 1, NULL);
INSERT INTO auction_log VALUES (105, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":434000}', '2011-11-03 16:44:24.431', 1, NULL);
INSERT INTO auction_log VALUES (106, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":433900}', '2011-11-03 16:45:56.924', 1, NULL);
INSERT INTO auction_log VALUES (107, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":433500}', '2011-11-03 16:47:20.311', 1, NULL);
INSERT INTO auction_log VALUES (108, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":433400}', '2011-11-03 16:48:52.167', 1, NULL);
INSERT INTO auction_log VALUES (111, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":432500}', '2011-11-03 16:53:15.268', 1, NULL);
INSERT INTO auction_log VALUES (112, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":432400}', '2011-11-03 16:54:37.702', 1, NULL);
INSERT INTO auction_log VALUES (115, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":431500}', '2011-11-03 16:58:58.658', 1, NULL);
INSERT INTO auction_log VALUES (117, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":425900}', '2011-11-03 17:01:46.57', 1, NULL);
INSERT INTO auction_log VALUES (119, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":430400}', '2011-11-03 17:04:49.386', 1, NULL);
INSERT INTO auction_log VALUES (121, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":429400}', '2011-11-03 17:07:50.205', 1, NULL);
INSERT INTO auction_log VALUES (123, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":428400}', '2011-11-03 17:10:55.566', 1, NULL);
INSERT INTO auction_log VALUES (124, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":427900}', '2011-11-03 17:12:35.765', 1, NULL);
INSERT INTO auction_log VALUES (125, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":427400}', '2011-11-03 17:14:14.337', 1, NULL);
INSERT INTO auction_log VALUES (126, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":426900}', '2011-11-03 17:15:56.473', 1, NULL);
INSERT INTO auction_log VALUES (109, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":433000}', '2011-11-03 16:50:16.848', 1, NULL);
INSERT INTO auction_log VALUES (113, 2, 'promto863', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":432000}', '2011-11-03 16:55:59.006', 1, NULL);
INSERT INTO auction_log VALUES (116, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":431400}', '2011-11-03 17:00:13.108', 1, NULL);
INSERT INTO auction_log VALUES (110, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":432900}', '2011-11-03 16:51:50.209', 1, NULL);
INSERT INTO auction_log VALUES (114, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":431900}', '2011-11-03 16:57:35.115', 1, NULL);
INSERT INTO auction_log VALUES (118, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":430900}', '2011-11-03 17:03:19.789', 1, NULL);
INSERT INTO auction_log VALUES (127, 2, 'bau3mex982', 'removeSelfFromAuctionRound', NULL, '2011-11-03 17:17:13.395', 1, 'bau3mex982');
INSERT INTO auction_log VALUES (120, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":429900}', '2011-11-03 17:06:23.814', 1, NULL);
INSERT INTO auction_log VALUES (122, 2, 'bau3mex982', 'setCriterionsForUser', '{"idInAuction":1,"criterionType":"NUMERIC","listType":0,"nameInAuction":"Cena","numericValue":428900}', '2011-11-03 17:09:17.397', 1, NULL);


--
-- Name: auction_log_sequencer; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('auction_log_sequencer', 127, true);


--
-- Data for Name: auction_planner; Type: TABLE DATA; Schema: public; Owner: postgres
--



--
-- Name: auction_planner_sequencer; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('auction_planner_sequencer', 1, false);


--
-- Data for Name: auction_round; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO auction_round VALUES (2, 1, 'NORMAL', NULL, 0, 1, '', '2011-11-03 15:00:00', '2011-11-03 17:17:56', 1, 120000, 1, 1, 0);


--
-- Name: auction_sequencer; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('auction_sequencer', 2, true);


--
-- Data for Name: auction_user; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO auction_user VALUES (2, 'promto863', 'PARTICIPANT', '$1$cnE7ON.Z$8mIo9lF0CFvZniwwGPuHt/', 1, 1, 'Dublin');
INSERT INTO auction_user VALUES (2, 'admin', 'ADMIN', '$1$M1C6rx3w$1h8NBOd4YNdecrig1Efl01', 1, 1, 'admin');
INSERT INTO auction_user VALUES (2, 'bau3mex982', 'PARTICIPANT', '$1$r.MTIYm3$8okT7JC1YKfeb7REjMRpA.', 1, 1, 'Belehrad');


--
-- Data for Name: auction_user_criterion; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO auction_user_criterion VALUES (2, 'promto863', 2, 1, 60, NULL, NULL, '2011-11-03 10:57:32.678');
INSERT INTO auction_user_criterion VALUES (2, 'promto863', 1, 1, 425900.0, NULL, NULL, '2011-11-03 17:01:46.57');


--
-- Data for Name: auction_user_criterion_list; Type: TABLE DATA; Schema: public; Owner: postgres
--



--
-- Data for Name: c_action; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO c_action VALUES ('disconnectCurrentUserFromAuction', 'Odhlásenie užívateľa');
INSERT INTO c_action VALUES ('setCriterionsForUser', 'Zmena kritéria užívateľom');
INSERT INTO c_action VALUES ('connectCurrentUserToAuction', 'Prihlásenie užívateľa');
INSERT INTO c_action VALUES ('addUserToAuctionRound', 'Pridanie užívateľa do kola');
INSERT INTO c_action VALUES ('addCriterionToAuctionRound', 'Pridanie kritéria do kola');
INSERT INTO c_action VALUES ('createAuctionRound', 'Vytvorenie kola');
INSERT INTO c_action VALUES ('setAuctionRound', 'Zmena kola');
INSERT INTO c_action VALUES ('addUserToAuction', 'Pridanie užívateľa do aukcie');
INSERT INTO c_action VALUES ('setUserInAuction', 'Zmena užívateľa v aukcií');
INSERT INTO c_action VALUES ('createAuction', 'Vytvorenie aukcie');
INSERT INTO c_action VALUES ('setAuction', 'Zmena aukcie');
INSERT INTO c_action VALUES ('setCriterionForAuctionRound', 'Zmena kritéria v kole');
INSERT INTO c_action VALUES ('removeUserFromAuctionRound', 'Odstránenie užívateľa z kola');
INSERT INTO c_action VALUES ('removeCriterionFromAuctionRound', 'Odstránenie kritéria z kola');
INSERT INTO c_action VALUES ('removeCriterionsFromAuctionRound', 'Odstránenie kritérií z kola');
INSERT INTO c_action VALUES ('removeUserFromAuction', 'Odstránenie užívateľa z aukcie');
INSERT INTO c_action VALUES ('deleteAuctionRound', 'Odstránenie kola');
INSERT INTO c_action VALUES ('deleteAuction', 'Odstránenie aukcie');
INSERT INTO c_action VALUES ('setCriterionItem', 'Zmena položky kritéria');
INSERT INTO c_action VALUES ('removeCriterionItemFromCriterion', 'Odstránenie položky z kritéria');
INSERT INTO c_action VALUES ('addCriterionItemToCriterion', 'Pridanie položky do kritéria');
INSERT INTO c_action VALUES ('setCriterionBestInputValue', 'Vylepšenie vstupnej hodnoty kritéria');
INSERT INTO c_action VALUES ('setAuctionRoundActive', 'Aktivácia kola');
INSERT INTO c_action VALUES ('setAuctionRoundInactive', 'Vypnutie kola');
INSERT INTO c_action VALUES ('removeSelfFromAuctionRound', 'Odstúpenie účastníka z kola aukcie');


--
-- Data for Name: c_auction_role; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO c_auction_role VALUES ('PARTICIPANT', 'can modify his criterion valus while active');
INSERT INTO c_auction_role VALUES ('OBSERVER', 'can view auction while active');
INSERT INTO c_auction_role VALUES ('ADMIN', 'administrates auction');


--
-- Data for Name: c_auction_status; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO c_auction_status VALUES ('RUNNING', 'running');
INSERT INTO c_auction_status VALUES ('FINISHED', 'finished');
INSERT INTO c_auction_status VALUES ('BLOCKED', 'blocked');
INSERT INTO c_auction_status VALUES ('WAITING', 'waiting');


--
-- Data for Name: c_auction_type; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO c_auction_type VALUES ('PUBLIC', 'public auction');
INSERT INTO c_auction_type VALUES ('PRIVATE', 'private');


--
-- Data for Name: c_compare_algorithm; Type: TABLE DATA; Schema: public; Owner: postgres
--



--
-- Data for Name: c_criterion_type; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO c_criterion_type VALUES ('BOOLEAN', 'Áno/Nie');
INSERT INTO c_criterion_type VALUES ('DATE', 'Dátum');
INSERT INTO c_criterion_type VALUES ('INTEGER', 'Celé číslo');
INSERT INTO c_criterion_type VALUES ('NUMERIC', 'Desatinné číslo');
INSERT INTO c_criterion_type VALUES ('TEXT', 'Text');


--
-- Data for Name: c_currency; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO c_currency VALUES ('EURO', '€');
INSERT INTO c_currency VALUES ('SKK', 'SKK');
INSERT INTO c_currency VALUES ('CZK', 'CZK');
INSERT INTO c_currency VALUES ('DOLLAR', '$');


--
-- Data for Name: c_item_type; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO c_item_type VALUES ('ROOT', 'root');
INSERT INTO c_item_type VALUES ('GENERAL', 'general');
INSERT INTO c_item_type VALUES ('FINAL_NODE', 'cant have children');
INSERT INTO c_item_type VALUES ('CATEGORY_NODE', 'category node');


--
-- Data for Name: c_message_type; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO c_message_type VALUES ('SYSTEM_MESSAGE', 'system information messages');
INSERT INTO c_message_type VALUES ('AUCTION_MESSAGE', 'informational message inside auction');
INSERT INTO c_message_type VALUES ('NORMAL_MESSAGE', 'normal message inside the system');


--
-- Data for Name: c_role; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO c_role VALUES ('ADMIN', 'all privileges');
INSERT INTO c_role VALUES ('USER', 'can administrate auctions with ownership');
INSERT INTO c_role VALUES ('AUCTION_CREATOR', 'can create auctions, can modify auctions with ownership');
INSERT INTO c_role VALUES ('AUCTION_MANAGER', 'can create and modify all auctions');


--
-- Data for Name: c_round_type; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO c_round_type VALUES ('NORMAL', 'normal');
INSERT INTO c_round_type VALUES ('PRE_ROUND', 'pre round');


--
-- Data for Name: chat; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO chat VALUES (2, 'promto863', 'admin', 2, 'NORMAL_MESSAGE', 'Dobrý deň, potvrdzujeme správnosť zadaných parametrov.', 1, 1, '2011-11-03 14:39:22.555', '2011-11-03 14:39:26.418');
INSERT INTO chat VALUES (3, 'admin', 'promto863', 2, 'SYSTEM_MESSAGE', 'Dobry den, vporiadku.', 0, 1, '2011-11-03 14:40:21.659', NULL);
INSERT INTO chat VALUES (4, 'admin', 'bau3mex982', 2, 'SYSTEM_MESSAGE', 'Mate uz zviditelnene svoje startovne poradie.', 0, 1, '2011-11-03 14:58:33.65', NULL);
INSERT INTO chat VALUES (5, 'admin', 'promto863', 2, 'SYSTEM_MESSAGE', 'Mate uz zviditelnene svoje startovne poradie.', 0, 1, '2011-11-03 14:58:33.686', NULL);
INSERT INTO chat VALUES (6, 'promto863', 'admin', 2, 'NORMAL_MESSAGE', 'dobrý deň, ospravedlňujem sa ale môžte mi ešte raz poslať kláves na refresh zobrazenia. (už som sa naˇv pýtal aj minule)', 1, 1, '2011-11-03 15:12:36.761', '2011-11-03 15:12:38.016');
INSERT INTO chat VALUES (8, 'admin', 'promto863', 2, 'SYSTEM_MESSAGE', 'klavesa F5', 1, 1, '2011-11-03 15:13:41.102', '2011-11-03 15:13:42.845');
INSERT INTO chat VALUES (7, 'admin', 'bau3mex982', 2, 'SYSTEM_MESSAGE', 'klavesa F5', 1, 1, '2011-11-03 15:13:41.064', '2011-11-03 15:13:44.292');
INSERT INTO chat VALUES (9, 'admin', 'bau3mex982', 2, 'SYSTEM_MESSAGE', 'prepacte, predchadzajuca sprava nemala ist vam', 1, 1, '2011-11-03 15:14:23.936', '2011-11-03 15:14:25.637');
INSERT INTO chat VALUES (11, 'admin', 'promto863', 2, 'SYSTEM_MESSAGE', 'Zviditelnili sme vam aktualne najlepsie kriteria', 1, 1, '2011-11-03 15:21:20.47', '2011-11-03 15:21:21.457');
INSERT INTO chat VALUES (10, 'admin', 'bau3mex982', 2, 'SYSTEM_MESSAGE', 'Zviditelnili sme vam aktualne najlepsie kriteria', 1, 1, '2011-11-03 15:21:20.443', '2011-11-03 15:21:22.467');
INSERT INTO chat VALUES (13, 'SYSTEM', 'promto863', 2, 'SYSTEM_MESSAGE', 'Uchádzač sa vzdal a bol odstránený z prebiehajúceho kola aukcie', 1, 1, '2011-11-03 17:17:13.408', '2011-11-03 17:17:16.004');
INSERT INTO chat VALUES (14, 'SYSTEM', 'admin', 2, 'SYSTEM_MESSAGE', 'Uchádzač "Belehrad" sa vzdal a bol odstránený z prebiehajúceho kola aukcie', 1, 1, '2011-11-03 17:17:13.416', '2011-11-03 17:17:16.176');
INSERT INTO chat VALUES (12, 'SYSTEM', 'bau3mex982', 2, 'SYSTEM_MESSAGE', 'Vzdali ste sa a boli ste odstránený z prebiehajúceho kola aukcie', 1, 1, '2011-11-03 17:17:13.396', '2011-11-03 17:17:18.828');
INSERT INTO chat VALUES (15, 'admin', 'bau3mex982', 2, 'SYSTEM_MESSAGE', 'Dakujeme vam za ucast v elektronickej aukcii', 1, 1, '2011-11-03 17:18:31.037', '2011-11-03 17:18:32.962');
INSERT INTO chat VALUES (16, 'admin', 'promto863', 2, 'SYSTEM_MESSAGE', 'Dakujeme vam za ucast v elektronickej aukcii', 1, 1, '2011-11-03 17:18:31.049', '2011-11-03 17:18:33.488');
INSERT INTO chat VALUES (17, 'admin', 'bau3mex982', 2, 'SYSTEM_MESSAGE', 'Protokol o aukcii vam bude poslany zajtra', 0, 1, '2011-11-03 17:19:58.587', NULL);
INSERT INTO chat VALUES (18, 'admin', 'promto863', 2, 'SYSTEM_MESSAGE', 'Protokol o aukcii vam bude poslany zajtra', 1, 1, '2011-11-03 17:19:58.605', '2011-11-03 17:20:03.496');


--
-- Name: chat_sequencer; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('chat_sequencer', 18, true);


--
-- Data for Name: client; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO client VALUES (14, 'Forespo', '000000000', '000000000000', '', '', '', '', '', '', '000000000000');
INSERT INTO client VALUES (15, 'Promto', '000000000', '000000000000', '', '', '', '', '', '', '000000000000');
INSERT INTO client VALUES (19, 'Bau3mex', '000000000', '000000000000', '', '', '', '', '', '', '000000000000');


--
-- Name: client_sequencer; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('client_sequencer', 19, true);


--
-- Name: criterion_item_sequencer; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('criterion_item_sequencer', 1, true);


--
-- Data for Name: item_tree; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO item_tree VALUES (0, 'ROOT', 'ROOT', 'ROOT', 0, NULL, NULL, NULL, 1, 0, 0, 0);


--
-- Name: item_tree_sequencer; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('item_tree_sequencer', 1, true);


--
-- Data for Name: project; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO project VALUES (2, 'Rekonštrukcia Poštovej banky', 14, 'admin', '2011-10-30 12:00:00', '2011-11-04 12:00:00', '2011-10-30 17:06:35.429', 0, '');


--
-- Data for Name: project_item_tree; Type: TABLE DATA; Schema: public; Owner: postgres
--



--
-- Name: project_sequencer; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('project_sequencer', 2, true);


--
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO users VALUES ('SYSTEM', '$1$eeCqaEGg$hZeixD2SfXumK/GuaDJE51', 'ADMIN', NULL, 'SYSTEM', 'SYSTEM', '', '', 1, NULL, NULL, 0, NULL);
INSERT INTO users VALUES ('admin2', '$1$SNaAAldJ$ljbJ7pZ1Jo3GTa5CXWTIE0', 'ADMIN', NULL, '', '', '', '', 1, NULL, NULL, 0, NULL);
INSERT INTO users VALUES ('bau3mex982', '$1$jPxy1D3W$eCQJ54VOiCtJLlpfYc.mD.', 'USER', 19, '', '', '', '', 1, NULL, '2011-11-03 14:04:58.829', 0, NULL);
INSERT INTO users VALUES ('promto863', '$1$ouVrmwTi$lgCjOnTsvKswoAXFmcL79.', 'USER', NULL, '', '', '', '', 1, NULL, '2011-11-03 14:14:45.011', 0, NULL);
INSERT INTO users VALUES ('admin', '$1$wq1d1.Ef$XGHWfiuGPpcGtMIih5qL2.', 'ADMIN', NULL, 'admin', 'admin', '', '', 1, NULL, '2011-11-03 14:31:01.549', 0, 'dd/MM/yy-HH:mm%yyyy-MM-dd  HH:mm:ss%yyyy/MM/dd%yy/MM/dd-HH:mm%1200%10%#,##0.00%1.0%SK%true%true%60%sk_SK%0.05%3%true%false%{"classHeaderColumn":2,"criterion":false,"headers":[1,2,3,4,5,6,7,8,9,10,11,12],"id":0,"importLineNumber":11,"importSheetNumber":3,"levelDetection":1,"levelDetections":[{"description":"","disabled":false,"escape":true,"label":"Pridaný prvý riadok","value":0},{"description":"","disabled":false,"escape":true,"label":"Odis / Kros","value":1}],"mappings":[{"checkedList":[false,false,false,true,false,false,false,false,false,false,false,false],"name":"name","translatedName":"Názov"},{"checkedList":[true,false,false,false,false,false,false,false,false,false,false,false],"name":"order","translatedName":"Poradie"},{"checkedList":[false,false,false,false,false,false,false,false,false,false,false,false],"name":"description","translatedName":"Info"},{"checkedList":[false,false,false,false,false,true,false,false,false,false,false,false],"name":"unitType","translatedName":"Merná jednotka"},{"checkedList":[false,false,true,false,false,false,false,false,false,false,false,false],"name":"code","translatedName":"Kód"},{"checkedList":[false,false,false,false,true,false,false,false,false,false,false,false],"name":"defaultAmount","translatedName":"Množstvo"}],"name":"Odis - Položka","numberOfColumns":12,"skipOuterLevel":false,"templateClass":"sk.adresa.prosale.core.data.Item","valueType":0}%{"classHeaderColumn":2,"criterion":true,"headers":[1,2,3,4,5,6,7,8,9,10,11,12],"id":0,"importLineNumber":12,"importSheetNumber":3,"levelDetection":1,"levelDetections":[{"description":"","disabled":false,"escape":true,"label":"Pridaný prvý riadok","value":0},{"description":"","disabled":false,"escape":true,"label":"Odis / Kros","value":1}],"mappings":[{"checkedList":[true,false,false,false,false,false,false,false,false,false,false,false],"name":"order","translatedName":"Poradie"},{"checkedList":[false,false,false,true,false,false,false,false,false,false,false,false],"name":"name","translatedName":"Názov"},{"checkedList":[false,false,false,false,false,false,false,false,false,false,false,false],"name":"description","translatedName":"Info"},{"checkedList":[false,false,true,false,false,false,false,false,false,false,false,false],"name":"code","translatedName":"Kód"},{"checkedList":[false,false,false,false,false,true,false,false,false,false,false,false],"name":"unitType","translatedName":"Merná jednotka"},{"checkedList":[false,false,false,false,true,false,false,false,false,false,false,false],"name":"amount","translatedName":"Množstvo"},{"checkedList":[false,false,false,false,false,false,false,true,false,false,false,false],"name":"pricePerUnit","translatedName":"Cena"}],"name":"Odis - Kritérium","numberOfColumns":12,"skipOuterLevel":false,"templateClass":"sk.adresa.prosale.core.data.CriterionItem","valueType":1}%{"classHeaderColumn":3,"criterion":false,"headers":[1,2,3,4,5,6,7,8],"id":0,"importLineNumber":11,"importSheetNumber":1,"levelDetection":1,"levelDetections":[{"description":"","disabled":false,"escape":true,"label":"Pridaný prvý riadok","value":0},{"description":"","disabled":false,"escape":true,"label":"Odis / Kros","value":1}],"mappings":[{"checkedList":[false,false,true,false,false,false,false,false],"name":"name","translatedName":"Názov"},{"checkedList":[true,false,false,false,false,false,false,false],"name":"order","translatedName":"Poradie"},{"checkedList":[false,false,false,false,false,false,false,false],"name":"description","translatedName":"Info"},{"checkedList":[false,false,false,true,false,false,false,false],"name":"unitType","translatedName":"Merná jednotka"},{"checkedList":[false,true,false,false,false,false,false,false],"name":"code","translatedName":"Kód"},{"checkedList":[false,false,false,false,true,false,false,false],"name":"defaultAmount","translatedName":"Množstvo"}],"name":"Kros - Položka","numberOfColumns":8,"skipOuterLevel":false,"templateClass":"sk.adresa.prosale.core.data.Item","valueType":0}%{"classHeaderColumn":3,"criterion":false,"headers":[1,2,3,4,5,6,7,8,9,10,11,12],"id":0,"importLineNumber":11,"importSheetNumber":3,"levelDetection":1,"levelDetections":[{"description":"","disabled":false,"escape":true,"label":"Pridaný prvý riadok","value":0},{"description":"","disabled":false,"escape":true,"label":"Odis / Kros","value":1}],"mappings":[{"checkedList":[false,false,true,false,false,false,false,false,false,false,false,false],"name":"name","translatedName":"Názov"},{"checkedList":[true,false,false,false,false,false,false,false,false,false,false,false],"name":"order","translatedName":"Poradie"},{"checkedList":[false,false,false,false,false,false,false,false,false,false,false,false],"name":"description","translatedName":"Info"},{"checkedList":[false,false,false,false,true,false,false,false,false,false,false,false],"name":"unitType","translatedName":"Merná jednotka"},{"checkedList":[false,true,false,false,false,false,false,false,false,false,false,false],"name":"code","translatedName":"Kód"},{"checkedList":[false,false,false,true,false,false,false,false,false,false,false,false],"name":"defaultAmount","translatedName":"Množstvo"}],"name":"Odis - Položka - SO 16","numberOfColumns":12,"skipOuterLevel":false,"templateClass":"sk.adresa.prosale.core.data.Item","valueType":0}%{"classHeaderColumn":2,"criterion":false,"headers":[1,2,3,4,5,6,7,8,9,10],"id":0,"importLineNumber":7,"importSheetNumber":2,"levelDetection":1,"levelDetections":[{"description":"","disabled":false,"escape":true,"label":"Pridaný prvý riadok","value":0},{"description":"","disabled":false,"escape":true,"label":"Odis / Kros","value":1}],"mappings":[{"checkedList":[false,true,false,false,false,false,false,false,false,false],"name":"name","translatedName":"Názov"},{"checkedList":[true,false,false,false,false,false,false,false,false,false],"name":"order","translatedName":"Poradie"},{"checkedList":[false,false,false,false,false,false,false,false,false,false],"name":"description","translatedName":"Info"},{"checkedList":[false,false,false,true,false,false,false,false,false,false],"name":"unitType","translatedName":"Merná jednotka"},{"checkedList":[false,false,false,false,false,false,false,false,false,false],"name":"code","translatedName":"Kód"},{"checkedList":[false,false,true,false,false,false,false,false,false,false],"name":"defaultAmount","translatedName":"Množstvo"}],"name":"Custom excel - položka","numberOfColumns":10,"skipOuterLevel":false,"templateClass":"sk.adresa.prosale.core.data.Item","valueType":0}%{"classHeaderColumn":3,"criterion":true,"headers":[1,2,3,4,5,6,7,8,9,10,11,12],"id":0,"importLineNumber":11,"importSheetNumber":3,"levelDetection":1,"levelDetections":[{"description":"","disabled":false,"escape":true,"label":"Pridaný prvý riadok","value":0},{"description":"","disabled":false,"escape":true,"label":"Odis / Kros","value":1}],"mappings":[{"checkedList":[true,false,false,false,false,false,false,false,false,false,false,false],"name":"order","translatedName":"Poradie"},{"checkedList":[false,false,true,false,false,false,false,false,false,false,false,false],"name":"name","translatedName":"Názov"},{"checkedList":[false,false,false,false,false,false,false,false,false,false,false,false],"name":"description","translatedName":"Info"},{"checkedList":[false,true,false,false,false,false,false,false,false,false,false,false],"name":"code","translatedName":"Kód"},{"checkedList":[false,false,false,false,true,false,false,false,false,false,false,false],"name":"unitType","translatedName":"Merná jednotka"},{"checkedList":[false,false,false,true,false,false,false,false,false,false,false,false],"name":"amount","translatedName":"Množstvo"},{"checkedList":[false,false,false,false,false,false,false,false,true,false,false,false],"name":"pricePerUnit","translatedName":"Cena"}],"name":"Odis - Kritérium - SO 16","numberOfColumns":12,"skipOuterLevel":false,"templateClass":"sk.adresa.prosale.core.data.CriterionItem","valueType":0}%{"classHeaderColumn":2,"criterion":true,"headers":[1,2,3,4,5,6,7,8,9,10],"id":0,"importLineNumber":7,"importSheetNumber":2,"levelDetection":1,"levelDetections":[{"description":"","disabled":false,"escape":true,"label":"Pridaný prvý riadok","value":0},{"description":"","disabled":false,"escape":true,"label":"Odis / Kros","value":1}],"mappings":[{"checkedList":[true,false,false,false,false,false,false,false,false,false],"name":"order","translatedName":"Poradie"},{"checkedList":[false,true,false,false,false,false,false,false,false,false],"name":"name","translatedName":"Názov"},{"checkedList":[false,false,false,false,false,false,false,false,false,false],"name":"description","translatedName":"Info"},{"checkedList":[false,false,false,false,false,false,false,false,false,false],"name":"code","translatedName":"Kód"},{"checkedList":[false,false,false,true,false,false,false,false,false,false],"name":"unitType","translatedName":"Merná jednotka"},{"checkedList":[false,false,true,false,false,false,false,false,false,false],"name":"amount","translatedName":"Množstvo"},{"checkedList":[false,false,false,false,true,false,false,true,false,false],"name":"pricePerUnit","translatedName":"Cena"}],"name":"Custom excel - kritérium","numberOfColumns":10,"skipOuterLevel":false,"templateClass":"sk.adresa.prosale.core.data.CriterionItem","valueType":0}%{"classHeaderColumn":2,"criterion":false,"headers":[1,2,3,4,5,6,7,8,9,10,11,12],"id":0,"importLineNumber":11,"importSheetNumber":3,"levelDetection":0,"levelDetections":[{"description":"","disabled":false,"escape":true,"label":"Pridaný prvý riadok","value":0},{"description":"","disabled":false,"escape":true,"label":"Odis / Kros","value":1}],"mappings":[{"checkedList":[false,false,false,true,false,false,false,false,false,false,false,false],"name":"name","translatedName":"Názov"},{"checkedList":[true,false,false,false,false,false,false,false,false,false,false,false],"name":"order","translatedName":"Poradie"},{"checkedList":[false,false,false,false,false,false,false,false,false,false,false,false],"name":"description","translatedName":"Info"},{"checkedList":[false,false,false,false,false,true,false,false,false,false,false,false],"name":"unitType","translatedName":"Merná jednotka"},{"checkedList":[false,false,true,false,false,false,false,false,false,false,false,false],"name":"code","translatedName":"Kód"},{"checkedList":[false,false,false,false,true,false,false,false,false,false,false,false],"name":"defaultAmount","translatedName":"Množstvo"}],"name":"Odis - Položka - ROWLEVEL","numberOfColumns":12,"skipOuterLevel":false,"templateClass":"sk.adresa.prosale.core.data.Item","valueType":0}%{"classHeaderColumn":3,"criterion":false,"headers":[1,2,3,4,5,6,7,8],"id":0,"importLineNumber":11,"importSheetNumber":1,"levelDetection":0,"levelDetections":[{"description":"","disabled":false,"escape":true,"label":"Pridaný prvý riadok","value":0},{"description":"","disabled":false,"escape":true,"label":"Odis / Kros","value":1}],"mappings":[{"checkedList":[false,false,true,false,false,false,false,false],"name":"name","translatedName":"Názov"},{"checkedList":[true,false,false,false,false,false,false,false],"name":"order","translatedName":"Poradie"},{"checkedList":[false,false,false,false,false,false,false,false],"name":"description","translatedName":"Info"},{"checkedList":[false,false,false,true,false,false,false,false],"name":"unitType","translatedName":"Merná jednotka"},{"checkedList":[false,true,false,false,false,false,false,false],"name":"code","translatedName":"Kód"},{"checkedList":[false,false,false,false,true,false,false,false],"name":"defaultAmount","translatedName":"Množstvo"}],"name":"Kros - Položka - ROWLEVEL","numberOfColumns":8,"skipOuterLevel":false,"templateClass":"sk.adresa.prosale.core.data.Item","valueType":0}%{"classHeaderColumn":3,"criterion":true,"headers":[1,2,3,4,5,6,7,8],"id":11,"importLineNumber":11,"importSheetNumber":1,"levelDetection":0,"levelDetections":[{"description":"","disabled":false,"escape":true,"label":"Pridaný prvý riadok","value":0},{"description":"","disabled":false,"escape":true,"label":"Odis / Kros","value":1}],"mappings":[{"checkedList":[true,false,false,false,false,false,false,false],"name":"order","translatedName":"Poradie"},{"checkedList":[false,false,true,false,false,false,false,false],"name":"name","translatedName":"Názov"},{"checkedList":[false,false,false,false,false,false,false,false],"name":"description","translatedName":"Info"},{"checkedList":[false,true,false,false,false,false,false,false],"name":"code","translatedName":"Kód"},{"checkedList":[false,false,false,true,false,false,false,false],"name":"unitType","translatedName":"Merná jednotka"},{"checkedList":[false,false,false,false,true,false,false,false],"name":"amount","translatedName":"Množstvo"},{"checkedList":[false,false,false,false,false,false,true,false],"name":"pricePerUnit","translatedName":"Cena"}],"name":"Kros - Kritérium -ROWLEVEL","numberOfColumns":8,"skipOuterLevel":false,"templateClass":"sk.adresa.prosale.core.data.CriterionItem","valueType":0}%{"classHeaderColumn":2,"criterion":true,"headers":[1,2,3,4,5,6,7,8,9,10,11,12],"id":11,"importLineNumber":11,"importSheetNumber":3,"levelDetection":0,"levelDetections":[{"description":"","disabled":false,"escape":true,"label":"Pridaný prvý riadok","value":0},{"description":"","disabled":false,"escape":true,"label":"Odis / Kros","value":1}],"mappings":[{"checkedList":[true,false,false,false,false,false,false,false,false,false,false,false],"name":"order","translatedName":"Poradie"},{"checkedList":[false,false,false,true,false,false,false,false,false,false,false,false],"name":"name","translatedName":"Názov"},{"checkedList":[false,false,false,false,false,false,false,false,false,false,false,false],"name":"description","translatedName":"Info"},{"checkedList":[false,false,true,false,false,false,false,false,false,false,false,false],"name":"code","translatedName":"Kód"},{"checkedList":[false,false,false,false,false,true,false,false,false,false,false,false],"name":"unitType","translatedName":"Merná jednotka"},{"checkedList":[false,false,false,false,true,false,false,false,false,false,false,false],"name":"amount","translatedName":"Množstvo"},{"checkedList":[false,false,false,false,false,false,false,false,false,true,false,false],"name":"pricePerUnit","translatedName":"Cena"}],"name":"Odis - Kritérium - ROWLEVEL","numberOfColumns":12,"skipOuterLevel":false,"templateClass":"sk.adresa.prosale.core.data.CriterionItem","valueType":0}%{"classHeaderColumn":5,"criterion":false,"headers":[1,2,3,4,5,6,7,8,9,10,11,12],"id":0,"importLineNumber":14,"importSheetNumber":3,"levelDetection":1,"levelDetections":[{"description":"","disabled":false,"escape":true,"label":"Pridaný prvý riadok","value":0},{"description":"","disabled":false,"escape":true,"label":"Odis / Kros","value":1}],"mappings":[{"checkedList":[false,false,false,false,true,false,false,false,false,false,false,false],"name":"name","translatedName":"Názov"},{"checkedList":[true,false,false,false,false,false,false,false,false,false,false,false],"name":"order","translatedName":"Poradie"},{"checkedList":[false,false,false,false,false,false,false,false,false,false,false,false],"name":"description","translatedName":"Info"},{"checkedList":[false,false,false,false,false,true,false,false,false,false,false,false],"name":"unitType","translatedName":"Merná jednotka"},{"checkedList":[false,false,false,true,false,false,false,false,false,false,false,false],"name":"code","translatedName":"Kód"},{"checkedList":[false,false,false,false,false,false,true,false,false,false,false,false],"name":"defaultAmount","translatedName":"Množstvo"}],"name":"Odis - Položka Trencin","numberOfColumns":12,"skipOuterLevel":false,"templateClass":"sk.adresa.prosale.core.data.Item","valueType":0}%{"classHeaderColumn":5,"criterion":true,"headers":[1,2,3,4,5,6,7,8,9,10],"id":0,"importLineNumber":14,"importSheetNumber":3,"levelDetection":1,"levelDetections":[{"description":"","disabled":false,"escape":true,"label":"Pridaný prvý riadok","value":0},{"description":"","disabled":false,"escape":true,"label":"Odis / Kros","value":1}],"mappings":[{"checkedList":[true,false,false,false,false,false,false,false,false,false],"name":"order","translatedName":"Poradie"},{"checkedList":[false,false,false,false,true,false,false,false,false,false],"name":"name","translatedName":"Názov"},{"checkedList":[false,false,false,false,false,false,false,false,false,false],"name":"description","translatedName":"Info"},{"checkedList":[false,false,false,true,false,false,false,false,false,false],"name":"code","translatedName":"Kód"},{"checkedList":[false,false,false,false,false,true,false,false,false,false],"name":"unitType","translatedName":"Merná jednotka"},{"checkedList":[false,false,false,false,false,false,true,false,false,false],"name":"amount","translatedName":"Množstvo"},{"checkedList":[false,false,false,false,false,false,false,false,false,false],"name":"pricePerUnit","translatedName":"Cena"}],"name":"Kros - Kriterium Trencin","numberOfColumns":10,"skipOuterLevel":false,"templateClass":"sk.adresa.prosale.core.data.CriterionItem","valueType":0}%{"classHeaderColumn":4,"criterion":false,"headers":[1,2,3,4,5,6,7,8,9,10,11,12],"id":0,"importLineNumber":9,"importSheetNumber":1,"levelDetection":1,"levelDetections":[{"description":"","disabled":false,"escape":true,"label":"Pridaný prvý riadok","value":0},{"description":"","disabled":false,"escape":true,"label":"Odis / Kros","value":1}],"mappings":[{"checkedList":[false,false,false,true,false,false,false,false,false,false,false,false],"name":"name","translatedName":"Názov"},{"checkedList":[true,false,false,false,false,false,false,false,false,false,false,false],"name":"order","translatedName":"Poradie"},{"checkedList":[false,false,false,false,false,false,false,false,false,false,false,false],"name":"description","translatedName":"Info"},{"checkedList":[false,false,false,false,true,false,false,false,false,false,false,false],"name":"unitType","translatedName":"Merná jednotka"},{"checkedList":[false,false,true,false,false,false,false,false,false,false,false,false],"name":"code","translatedName":"Kód"},{"checkedList":[false,false,false,false,false,true,false,false,false,false,false,false],"name":"defaultAmount","translatedName":"Množstvo"}],"name":"Odis - Položka Trencin Novy","numberOfColumns":12,"skipOuterLevel":false,"templateClass":"sk.adresa.prosale.core.data.Item","valueType":0}%{"classHeaderColumn":4,"criterion":true,"headers":[1,2,3,4,5,6,7,8,9,10],"id":0,"importLineNumber":9,"importSheetNumber":1,"levelDetection":1,"levelDetections":[{"description":"","disabled":false,"escape":true,"label":"Pridaný prvý riadok","value":0},{"description":"","disabled":false,"escape":true,"label":"Odis / Kros","value":1}],"mappings":[{"checkedList":[true,false,false,false,false,false,false,false,false,false],"name":"order","translatedName":"Poradie"},{"checkedList":[false,false,false,true,false,false,false,false,false,false],"name":"name","translatedName":"Názov"},{"checkedList":[false,false,false,false,false,false,false,false,false,false],"name":"description","translatedName":"Info"},{"checkedList":[false,false,true,false,false,false,false,false,false,false],"name":"code","translatedName":"Kód"},{"checkedList":[false,false,false,false,true,false,false,false,false,false],"name":"unitType","translatedName":"Merná jednotka"},{"checkedList":[false,false,false,false,false,true,false,false,false,false],"name":"amount","translatedName":"Množstvo"},{"checkedList":[false,false,false,false,false,false,true,false,false,false],"name":"pricePerUnit","translatedName":"Cena"}],"name":"Kros - Kriterium Trencin Novy","numberOfColumns":10,"skipOuterLevel":false,"templateClass":"sk.adresa.prosale.core.data.CriterionItem","valueType":0}');
INSERT INTO users VALUES ('admin1', '$1$QeeWh2ZJ$Eo5OXaBGh9loZ1t7KBt/o1', 'ADMIN', 14, '', '', '', '', 1, NULL, '2011-11-03 15:05:06.556', 0, NULL);


--
-- Data for Name: users_item_tree; Type: TABLE DATA; Schema: public; Owner: postgres
--



--
-- Name: web_message_sequencer; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('web_message_sequencer', 1, true);


--
-- Data for Name: web_messages; Type: TABLE DATA; Schema: public; Owner: postgres
--



--
-- Name: auction_criterion_list_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY auction_criterion_list
    ADD CONSTRAINT auction_criterion_list_pk PRIMARY KEY (fk_auction, round, id_in_auction, item_id);


--
-- Name: auction_criterion_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY auction_criterion
    ADD CONSTRAINT auction_criterion_pk PRIMARY KEY (fk_auction, round, id_in_auction);


--
-- Name: auction_log_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY auction_log
    ADD CONSTRAINT auction_log_pk PRIMARY KEY (id);


--
-- Name: auction_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY auction
    ADD CONSTRAINT auction_pk PRIMARY KEY (id);


--
-- Name: auction_planner_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY auction_planner
    ADD CONSTRAINT auction_planner_pk PRIMARY KEY (id);


--
-- Name: auction_round_type_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY auction_round
    ADD CONSTRAINT auction_round_type_pk PRIMARY KEY (fk_auction, round);


--
-- Name: auction_uk1; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY auction
    ADD CONSTRAINT auction_uk1 UNIQUE (fk_project, fk_item, name);


--
-- Name: auction_user_criterion_li_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY auction_user_criterion_list
    ADD CONSTRAINT auction_user_criterion_li_pk PRIMARY KEY (fk_auction, fk_user, id_in_auction, round, item_id);


--
-- Name: auction_user_criterion_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY auction_user_criterion
    ADD CONSTRAINT auction_user_criterion_pk PRIMARY KEY (fk_auction, fk_user, id_in_auction, round);


--
-- Name: auction_user_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY auction_user
    ADD CONSTRAINT auction_user_pk PRIMARY KEY (fk_auction, fk_user);


--
-- Name: auction_user_uk1; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY auction_user
    ADD CONSTRAINT auction_user_uk1 UNIQUE (fk_auction, alias);


--
-- Name: c_action_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY c_action
    ADD CONSTRAINT c_action_pk PRIMARY KEY (id);


--
-- Name: c_auction_role_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY c_auction_role
    ADD CONSTRAINT c_auction_role_pk PRIMARY KEY (id);


--
-- Name: c_auction_status_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY c_auction_status
    ADD CONSTRAINT c_auction_status_pk PRIMARY KEY (id);


--
-- Name: c_auction_type_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY c_auction_type
    ADD CONSTRAINT c_auction_type_pk PRIMARY KEY (id);


--
-- Name: c_compare_algorithm_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY c_compare_algorithm
    ADD CONSTRAINT c_compare_algorithm_pk PRIMARY KEY (id);


--
-- Name: c_currenct_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY c_currency
    ADD CONSTRAINT c_currenct_pk PRIMARY KEY (id);


--
-- Name: c_item_type_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY c_item_type
    ADD CONSTRAINT c_item_type_pk PRIMARY KEY (id);


--
-- Name: c_message_type_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY c_message_type
    ADD CONSTRAINT c_message_type_pk PRIMARY KEY (id);


--
-- Name: c_role_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY c_role
    ADD CONSTRAINT c_role_pk PRIMARY KEY (id);


--
-- Name: c_round_type_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY c_round_type
    ADD CONSTRAINT c_round_type_pk PRIMARY KEY (id);


--
-- Name: chat_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY chat
    ADD CONSTRAINT chat_pk PRIMARY KEY (id);


--
-- Name: client_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY client
    ADD CONSTRAINT client_pk PRIMARY KEY (id);


--
-- Name: criterion_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY c_criterion_type
    ADD CONSTRAINT criterion_pk PRIMARY KEY (id);


--
-- Name: item_tree_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY item_tree
    ADD CONSTRAINT item_tree_pk PRIMARY KEY (id);


--
-- Name: project_item_tree_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY project_item_tree
    ADD CONSTRAINT project_item_tree_pk PRIMARY KEY (fk_project, fk_item_tree);


--
-- Name: project_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY project
    ADD CONSTRAINT project_pk PRIMARY KEY (id);


--
-- Name: users_item_tree_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY users_item_tree
    ADD CONSTRAINT users_item_tree_pk PRIMARY KEY (fk_user, fk_item_tree);


--
-- Name: users_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY users
    ADD CONSTRAINT users_pk PRIMARY KEY (login);


--
-- Name: web_messages_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY web_messages
    ADD CONSTRAINT web_messages_pk PRIMARY KEY (id);


--
-- Name: auction_criterion_ix_auction_round_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX auction_criterion_ix_auction_round_id ON auction_criterion USING btree (fk_auction, round, id_in_auction);


--
-- Name: auction_ix_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX auction_ix_id ON auction USING btree (id);


--
-- Name: auction_ix_project; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX auction_ix_project ON auction USING btree (fk_project);


--
-- Name: auction_log_ix_action; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX auction_log_ix_action ON auction_log USING btree (fk_action);


--
-- Name: auction_log_ix_auction; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX auction_log_ix_auction ON auction_log USING btree (fk_auction);


--
-- Name: auction_log_ix_round; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX auction_log_ix_round ON auction_log USING btree (fk_auction_round);


--
-- Name: auction_log_ix_time; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX auction_log_ix_time ON auction_log USING btree ("time");


--
-- Name: auction_log_ix_user; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX auction_log_ix_user ON auction_log USING btree (fk_user);


--
-- Name: auction_round_ix_au_round; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX auction_round_ix_au_round ON auction_round USING btree (fk_auction, round);


--
-- Name: auction_user_crit_ix_au_r_id_us; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX auction_user_crit_ix_au_r_id_us ON auction_user_criterion USING btree (fk_auction, round, id_in_auction, fk_user);


--
-- Name: auction_user_ix_au_user; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX auction_user_ix_au_user ON auction_user USING btree (fk_auction, fk_user);


--
-- Name: auction_user_ix_user; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX auction_user_ix_user ON auction_user USING btree (fk_user);


--
-- Name: client_ix_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX client_ix_id ON client USING btree (id);


--
-- Name: fki_auction_crit_list_fk2; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX fki_auction_crit_list_fk2 ON auction_criterion_list USING btree (fk_auction, round, id_in_auction, fk_parent);


--
-- Name: fki_item_tree_fk2; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX fki_item_tree_fk2 ON item_tree USING btree (fk_parent);


--
-- Name: item_tree_ix_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX item_tree_ix_id ON item_tree USING btree (id);


--
-- Name: project_item_ix_project; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX project_item_ix_project ON project_item_tree USING btree (fk_project);


--
-- Name: project_ix_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX project_ix_id ON project USING btree (id);


--
-- Name: project_ix_owner; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX project_ix_owner ON project USING btree (fk_user_owner);


--
-- Name: user_item_ix_user; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX user_item_ix_user ON users_item_tree USING btree (fk_user);


--
-- Name: users_ix_client; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX users_ix_client ON users USING btree (fk_client);


--
-- Name: users_ix_login; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX users_ix_login ON users USING btree (login);


--
-- Name: web_mesg_ix_id; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX web_mesg_ix_id ON web_messages USING btree (id);


--
-- Name: web_mesg_ix_valid_from; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX web_mesg_ix_valid_from ON web_messages USING btree (valid_from);


--
-- Name: web_msg_ix_valid_until; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX web_msg_ix_valid_until ON web_messages USING btree (valid_until);


--
-- Name: auction_c_auction_status_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction
    ADD CONSTRAINT auction_c_auction_status_fk1 FOREIGN KEY (fk_auction_status) REFERENCES c_auction_status(id);


--
-- Name: auction_c_auction_type_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction
    ADD CONSTRAINT auction_c_auction_type_fk1 FOREIGN KEY (fk_auction_type) REFERENCES c_auction_type(id);


--
-- Name: auction_c_currency_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction
    ADD CONSTRAINT auction_c_currency_fk1 FOREIGN KEY (fk_currency) REFERENCES c_currency(id);


--
-- Name: auction_criterion_auction_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction_criterion
    ADD CONSTRAINT auction_criterion_auction_fk1 FOREIGN KEY (fk_auction, round) REFERENCES auction_round(fk_auction, round);


--
-- Name: auction_criterion_crit_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction_criterion
    ADD CONSTRAINT auction_criterion_crit_fk1 FOREIGN KEY (fk_criterion_type) REFERENCES c_criterion_type(id);


--
-- Name: auction_criterion_list_au_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction_criterion_list
    ADD CONSTRAINT auction_criterion_list_au_fk1 FOREIGN KEY (fk_auction, round, id_in_auction) REFERENCES auction_criterion(fk_auction, round, id_in_auction);


--
-- Name: auction_item_tree_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction
    ADD CONSTRAINT auction_item_tree_fk1 FOREIGN KEY (fk_item) REFERENCES item_tree(id);


--
-- Name: auction_log_c_action_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction_log
    ADD CONSTRAINT auction_log_c_action_fk1 FOREIGN KEY (fk_action) REFERENCES c_action(id);


--
-- Name: auction_planner_auction_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction_planner
    ADD CONSTRAINT auction_planner_auction_fk1 FOREIGN KEY (fk_auction) REFERENCES auction(id);


--
-- Name: auction_planner_c_action_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction_planner
    ADD CONSTRAINT auction_planner_c_action_fk1 FOREIGN KEY (fk_action) REFERENCES c_action(id);


--
-- Name: auction_project_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction
    ADD CONSTRAINT auction_project_fk1 FOREIGN KEY (fk_project) REFERENCES project(id);


--
-- Name: auction_round_auction_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction_round
    ADD CONSTRAINT auction_round_auction_fk1 FOREIGN KEY (fk_auction) REFERENCES auction(id);


--
-- Name: auction_round_c_compare_a_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction_round
    ADD CONSTRAINT auction_round_c_compare_a_fk1 FOREIGN KEY (fk_compare_algorithm) REFERENCES c_compare_algorithm(id);


--
-- Name: auction_round_c_round_type_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction_round
    ADD CONSTRAINT auction_round_c_round_type_fk1 FOREIGN KEY (fk_round_type) REFERENCES c_round_type(id);


--
-- Name: auction_user_auction_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction_user
    ADD CONSTRAINT auction_user_auction_fk1 FOREIGN KEY (fk_auction) REFERENCES auction(id);


--
-- Name: auction_user_c_auction_role_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction_user
    ADD CONSTRAINT auction_user_c_auction_role_fk1 FOREIGN KEY (fk_auction_role) REFERENCES c_auction_role(id);


--
-- Name: auction_user_criterion_au_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction_user_criterion
    ADD CONSTRAINT auction_user_criterion_au_fk1 FOREIGN KEY (fk_auction, round, id_in_auction) REFERENCES auction_criterion(fk_auction, round, id_in_auction);


--
-- Name: auction_user_criterion_li_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction_user_criterion_list
    ADD CONSTRAINT auction_user_criterion_li_fk1 FOREIGN KEY (fk_auction, fk_user, id_in_auction, round) REFERENCES auction_user_criterion(fk_auction, fk_user, id_in_auction, round);


--
-- Name: auction_user_criterion_li_fk2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction_user_criterion_list
    ADD CONSTRAINT auction_user_criterion_li_fk2 FOREIGN KEY (fk_auction, round, id_in_auction, item_id) REFERENCES auction_criterion_list(fk_auction, round, id_in_auction, item_id);


--
-- Name: auction_user_users_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY auction_user
    ADD CONSTRAINT auction_user_users_fk1 FOREIGN KEY (fk_user) REFERENCES users(login);


--
-- Name: chat_c_message_type_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY chat
    ADD CONSTRAINT chat_c_message_type_fk1 FOREIGN KEY (fk_message_type) REFERENCES c_message_type(id);


--
-- Name: chat_users_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY chat
    ADD CONSTRAINT chat_users_fk1 FOREIGN KEY (fk_sender) REFERENCES users(login);


--
-- Name: chat_users_fk2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY chat
    ADD CONSTRAINT chat_users_fk2 FOREIGN KEY (fk_reciever) REFERENCES users(login);


--
-- Name: item_tree_c_item_type_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY item_tree
    ADD CONSTRAINT item_tree_c_item_type_fk1 FOREIGN KEY (fk_item_type) REFERENCES c_item_type(id);


--
-- Name: item_tree_fk2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY item_tree
    ADD CONSTRAINT item_tree_fk2 FOREIGN KEY (fk_parent) REFERENCES item_tree(id);


--
-- Name: project_client_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY project
    ADD CONSTRAINT project_client_fk1 FOREIGN KEY (fk_client) REFERENCES client(id);


--
-- Name: project_item_tree_item_tree_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY project_item_tree
    ADD CONSTRAINT project_item_tree_item_tree_fk1 FOREIGN KEY (fk_item_tree) REFERENCES item_tree(id);


--
-- Name: project_item_tree_project_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY project_item_tree
    ADD CONSTRAINT project_item_tree_project_fk1 FOREIGN KEY (fk_project) REFERENCES project(id);


--
-- Name: project_users_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY project
    ADD CONSTRAINT project_users_fk1 FOREIGN KEY (fk_user_owner) REFERENCES users(login);


--
-- Name: users_c_role_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY users
    ADD CONSTRAINT users_c_role_fk1 FOREIGN KEY (fk_role) REFERENCES c_role(id);


--
-- Name: users_client_fk1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY users
    ADD CONSTRAINT users_client_fk1 FOREIGN KEY (fk_client) REFERENCES client(id);


--
-- Name: users_item_tr_item_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY users_item_tree
    ADD CONSTRAINT users_item_tr_item_fk FOREIGN KEY (fk_item_tree) REFERENCES item_tree(id);


--
-- Name: users_item_tree_user_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY users_item_tree
    ADD CONSTRAINT users_item_tree_user_fk FOREIGN KEY (fk_user) REFERENCES users(login);


--
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


--
-- PostgreSQL database dump complete
--

